package net.yeah.mickey_zhouyou.database.domain;

/**
 * 所有关系类的公共超类
 * 
 * @author Mickey
 * 
 * @param <E1>
 * @param <E2>
 */
public abstract class BaseRelationship<E1 extends BaseEntity, E2 extends BaseEntity>
		extends BaseTable {

	private Long leftId;
	private Long rightId;

	public BaseRelationship(E1 e1, E2 e2) {
		if (e1 != null)
			this.leftId = e1.getId();
		if (e2 != null)
			this.rightId = e2.getId();
	}

	public Long getLeftId() {
		return leftId;
	}

	public Long getRightId() {
		return rightId;
	}

}
